import http from '@/axios/http';
import router from '@/libs/router';
export default {
  //首页
  getHomeDate(){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help',
        method:'post'
      }).then(res =>{
        resolve(res);
      });
    });
  },
  //参加助力
  helpStart(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/start',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  },
  //获取助力信息
  helpGet(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/get',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  },
  //进行兑换
  exchange(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/exchange',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  },
  //获取帮助好友信息
  forhelp(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/forhelp',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  },
  //进行帮好友助力
  dohelp(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/dohelp',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  },
  //兑换记录列表
  helplist(data){
    return new Promise((resolve,reject)=> {
      http({
        url:'/help/helplist',
        method:'post'
      },data).then(res =>{
        resolve(res);
      });
    });
  }
}
